Google News
logo
ReactJS - Quiz(MCQ)
What happens when the following render() method executes?
render(){
   let langs = ["Ruby","ES6","Scala"]
     return (<div>
       {langs.map(it => <p>{it}</p>)}
     </div>)
 }
A)
Error. Cannot use direct JavaScript code in JSX
B)
Error. Should be replaced with a for..loop for correct output
C)
Displays the list of languages in the array
D)
Displays nothing

Correct Answer :   Displays the list of languages in the array